home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Shareware
/
IDimager Personal 4.2.0.3
/
setup_IDimager_Personal_V4.exe
/
{app}
/
web
/
modules
/
frontpage.psc
< prev
next >
Wrap
Text File
|
2008-06-22
|
3KB
|
85 lines
<!-- optionally enter text for the home page here -->
%code
%include storeddata.inc %/include
%include resulttable.inc %/include
function LastUsedProps: WideString;
const
cCount = 50;
var
AProps: TCatalogItemProps;
ADs: TDBXOMClientDataSet;
i: Integer;
begin
result := toWideString('');
result := result + '<div id="lastlabels">';
result := result + '<div id="caption">';
result := result + ' Last used catalog labels';
result := result + '</div>';
AProps := TCatalogItemProps.Create(TCatalogItemProp, '');
ADs := catalog.NewDataSet;
if Catalog.IsSqlServer then
ADs.CommandText := 'select top ' + IntToStr(cCount) +' * from idProp where Propvalue <> ''A'' order by idCreated desc'
else
ADs.CommandText := 'select * from idProp where Propvalue <> ''A'' order by idCreated desc limit ' + IntToStr(cCount) + '';
ADs.Open;
AProps.AddDataSet (ADs);
ADs.Close;
ADs.Free;
Catalog.PathNameForProps (AProps, ' :: ', False);
Randomize;
for i := 0 to AProps.Count - 1 do
begin
result := result + '<span style="font-size: ' + IntToStr(RandomNumber(8) + 8) + 'pt;">';
result := result + iif(i = 0, '', ', ') + '<a href="javascript:getHTML(''%var:PageOffset/modules/labelimages.psc'', ''' + AjaxContainer + ''', ''GUID=' + AProps.Items[i].GUID + ''');" title="' + Aprops.Items[i].Name + '" style="color: ' + iif(i mod 2 = 0, '#0066a0; font-weight:bold', '') + ';">' + AProps.Items[i].PropName + '</a>';
result := result + '</span>';
end;
AProps.Free;
result := result + '</div>';
end;
function LastComments;
var
AItems: TCatalogItems;
begin
result := toWideString('');
if not FindStoredData ('dsLASTCOMMENTS', AItems, False) then
begin
AItems := TCatalogItems.Create (TCatalogItem, '');
StoreData ('dsLASTCOMMENTS', AItems);
end;
AItems.Clear;
if Catalog.EnumCommentedItems (AItems, 14) then
begin
AItems.Name := IntToStr(AItems.Count) + ' Last Commented Images';
result := result + '<div id="lastLabels">';
result := result + IncludeResultTable (AItems, 'dsLASTCOMMENTS', 1, AItems.Count, 80);
result := result + '</div>';
end;
end;
begin
result := toWideString('');
result := result + '<p>' + LastComments + '</p>';
result := result + '<p>' + LastUsedProps + '</p>';
end;
%/code